<%--
  Created by IntelliJ IDEA.
  User: Hasee
  Date: 2018/11/23
  Time: 15:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="model.Photo"%>
<%@ page import="dao.PhotoDao"%>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
   PhotoDao pdao = new PhotoDao();
   List<Photo> plist = new ArrayList<Photo>();
   plist=pdao.findAll();
%>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript">var x=0;
    </script>

    <title>照片</title>


    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">


    <link rel="stylesheet" type="text/css" href="bootstrap/css/htmleaf-demo.css">
    <link rel="stylesheet" href="bootstrap/css/gallery-clean.css">
    <link rel="stylesheet" href="bootstrap/css/fluid-gallery.css">
    <link rel="stylesheet" href="bootstrap/css/gallery-grid.css">
    <link rel="stylesheet" href="bootstrap/css/css/baguetteBox.min.css">
    <link rel="stylesheet" href="bootstrap/css/thumbnail-gallery.css">
</head>
<body>
<jsp:include page="navBar.jsp"/>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="jumbotron well">
                <ul class="breadcrumb">
                    <li>
                        <a href="index.jsp">首页</a>
                    </li>
                    <li>
                        <a href="#">社区</a>
                    </li>
                    <li class="active">
                        photos
                    </li>
                </ul>
                <center>
                    <font size="7" face="华文彩云">
                        照片墙
                    </font>
                </center>
            </div>
            <div class="row">
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img alt="300x200" src="bootstrap/images/49.jpg" width="300" height="300"/>
                        <div class="caption">
                            <h3>
                                &nbsp &nbsp  夜景
                            </h3>

                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img alt="300x200" src="bootstrap/images/gz.jpg" width="300" height="300"/>
                        <div class="caption">
                            <h3>
                                &nbsp &nbsp   广州
                            </h3>

                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img alt="300x200" src="bootstrap/images/hz.jpg" width="300" height="300"/>
                        <div class="caption">
                            <h3>
                                &nbsp &nbsp  杭州
                            </h3>

                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img alt="300x200" src="bootstrap/images/sh.jpg" width="300" height="300"/>
                        <div class="caption">
                            <h3>
                                &nbsp &nbsp上海
                            </h3>

                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img alt="300x200" src="bootstrap/images/sz.jpg" width="300" height="300"/>
                        <div class="caption">
                            <h3>
                                &nbsp &nbsp深圳
                            </h3>

                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img alt="300x200" src="bootstrap/images/qy.jpg" width="300" height="300"/>
                        <div class="caption">
                            <h3>
                                &nbsp &nbsp清远
                            </h3>

                        </div>
                    </div>
                </div>
            </div>
            <div class="row clearfix">
            <div class="col-md-12 column">
                <form role="form" action="PhotowallController">
                    <div class="form-group">
                        <label >评论</label><br><textarea cols=98 rows=9 name="describe" placeholder="请在这里评论"></textarea>
                    </div>
                    <button type="submit" class="btn btn-default">发表</button>
                    <%if (request.getAttribute("error")!= null){%>
                    <strong>警告！</strong><span class="tips-text"><%= request.getAttribute("error")%></span>
                    <%}%>
                </form>
            </div>

        </div>
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <h1><b>评论:</b></h1><br><br>
                    <%if(plist.size()==0){%>
                    <div class="row clearfix">
                        <div class="col-md-2 column">
                            <h3>暂无内容</h3><br>
                        </div>
                        <div class="col-md-10 column">
                            <p>
                                还没有评论
                            </p>
                        </div>
                    </div>
                    <%}else{%>
                    <%for(int k=0;k<plist.size();k++){%>
                    <div class="row clearfix">
                        <div class="col-md-2 column">

                        </div>
                        <div class="col-md-10 column">
                            <p>
                                <%=plist.get(k).getDescribe()%>
                            </p>
                        </div>

                        <br><br><br><br><br><br>
                    </div>
                    <%}%>
                    <%}%>
                </div>

            </div>
        </div>
    </div>
</div>
</body>
</html>
